<template>
	<view class="examinationReport">
		<view class="box">
			<text style="font-size: 16px; font-weight: 500;">
				体检报告
				<text style="font-weight: 300; font-size:12px; color: #AAAAAA;">单号：2020100908900</text>
			</text>
			<text>项目：{{ Data.list.packageName }}</text>
			<text>姓名：{{ Data.list.patientName }}</text>
			<text>身份证号：{{ Data.list.cardNum }}</text>
			<text>性别：{{ Data.list.sex }}</text>
			<text>年龄：{{ Data.list.age }}</text>
			<text>报告日期：{{ Data.list.createTime }}</text>
		</view>
		<view style="margin: 40rpx 31rpx;">所有项目</view>
		<navigator url="../examinationdetails/examinationdetails">
			<view style="margin: 0 20px; padding-bottom: 20px;">
				<uni-list><uni-list-item showArrow :title="v.name" v-for="v in Data2.items"/></uni-list>
			</view>
		</navigator>
	</view>
</template>

<script setup>
import { onLoad } from '@dcloudio/uni-app';
import { onMounted, reactive } from 'vue';
import { examinationDataStore } from '@/store/medicalStore.js';
import { medicalPerson, medicalPersonPackage } from '@/api/ExaminationService.js';
const data2 = examinationDataStore();

let Data = reactive({
	list: [],
});
let Data2=reactive({
	items: [],
})
onMounted(() => {
	medicalPerson({ id: 1 })
		.then(({ data }) => {
			Data.list = data.data;
			console.log(data.data);
		})
		.catch(err => {
			console.log(err);
		});
});
onLoad(opation => {
	medicalPersonPackage({ id: 1 })
		.then(({ data }) => {
			Data2.items=data.data
		})
		.catch(err => {
			console.log(err);
		});
});
</script>

<style lang="less">
.examinationReport {
	.box {
		width: 688rpx;
		height: 500rpx;
		margin: 40rpx 31rpx;
		border: 2rpx solid #f2f2f2;
		display: flex;
		font-size: 14px;
		flex-direction: column;
		letter-spacing: normal;
		color: #333333;
		font-weight: 200;
		text {
			margin: 14rpx;
		}
	}
}
</style>
